#include <cstdio>
using namespace std;

#define LEVEL_ONE (100000 * 0.1)
#define LEVEL_TWO (100000 * 0.1 + 100000 * 0.075)
#define LEVEL_THREE (100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05)
#define LEVEL_FOUR (100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03)
#define LEVEL_FIVE (100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + 400000 * 0.015)

int main()
{
    double profit, salary;
    scanf(" %lf", &profit);
    if (profit <= 100000)
        salary = profit * 0.1;
    else if (profit <= 200000)
        salary = (profit - 100000) * 0.075 + LEVEL_ONE;
    else if (profit <= 400000)
        salary = (profit - 200000) * 0.05 + LEVEL_TWO;
    else if (profit <= 600000)
        salary = (profit - 400000) * 0.03 + LEVEL_THREE;
    else if (profit <= 1000000)
        salary = (profit - 600000) * 0.015 + LEVEL_FOUR;
    else
        salary = (profit - 1000000) * 0.01 + LEVEL_FIVE;

    printf("%.2f", salary);
    return 0;
}